import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
    { path: '/', redirect: '/Book' },
    {
        path: '/Book',
        name: '图书管理',
        component: () => import('../views/Book.vue')
    },
    {
        path: '/BookType',
        name: '分类管理',
        component: () => import('../views/BookType.vue')
    },
    {
        path: '/404',
        name: '404',
        component: () => import('../views/404.vue')
    },
]

const router = new VueRouter({
    mode: 'history',
    routes
})

export default router
